﻿using System;
using System.Linq;
using System.Collections.Generic;

namespace HashFoo.Rest.Common
{
    /// <summary>
    /// Marks the base namespace of an service resouce definition assembly.  Useful for building uris.
    /// </summary>
    [AttributeUsage(AttributeTargets.Assembly)]
    public class ResourceRootNamespaceAttribute : Attribute
    {
        readonly string _rootNamespace;

        /// <summary>
        /// Creates a new <see cref="ResourceRootNamespaceAttribute"/> with a specific root namespace.
        /// </summary>
        /// <param name="rootNamespace"></param>
        public ResourceRootNamespaceAttribute(string rootNamespace )
        {
            _rootNamespace = rootNamespace;
        }

        /// <summary>
        /// The root namespace of the resources in this assembly.
        /// </summary>
        public string RootNamespace
        {
            get { return _rootNamespace; }
        }
    }
}